﻿#region Copyright 
/*-------------------------------------------------------------------------
* 命名空间名称/文件名:    SSPivot.Tools.Services.Captcha/ICaptchaService 
* CLR版本:     4.0.30319.42000
* 机器名称:    DESKTOP-NHMLO8A
* 功 能：       N/A
* 类 名：       ICaptchaService
* 创建时间：  2025/6/4 11:21:37
* 版本号：      v1.0
* 创建人:        xulong
*-------------------------------------------------------------------------*/
#endregion
using Lazy.SlideCaptcha.Core;
using Lazy.SlideCaptcha.Core.Validator;
using Microsoft.AspNetCore.Mvc;
using SSPivot.Admin.Core.Service.communal.Captcha.Dto;
using SSPivot.AspNetCore.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SSPivot.Tools.Services.Captcha
{
    /// <summary>
    /// 验证码服务
    /// </summary>
    public interface ICaptchaService : IApplicationService
    {
        #region 服务
        /// <summary>
        /// 生成
        /// </summary>
        /// <param name="captchaId">验证码id</param>
        /// <returns></returns>
        CaptchaData Generate(string captchaId = null);
        /// <summary>
        /// 验证
        /// </summary>
        /// <param name="captchaId">验证码Id</param>
        /// <param name="track">滑动轨迹</param>
        /// <returns></returns>
        ValidateResult CheckAsync([FromQuery] string captchaId, SlideTrack track);
        /// <summary>
        /// 发送短信验证码
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>

        Task<string> SendSmsCodeAsync(SendSmsCodeDto input);
        /// <summary>
        /// 发送邮件验证码
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<string> SendEmailCodeAsync(SendEmailCodeDto input);
        #endregion
    }
}
